package com.ruoyi.common.enums;

import java.util.Arrays;

public enum FrontMenuEnum {
    INDEX("/front/index","首页"),
    HEIXIE("/front/heixie","走进黑蝎"),
    DYNAMICS("/front/dynamics","动态信息"),
    SERVICE("/front/service","服务领域"),
    ACHIEVEMENT("/front/achievement","服务领域"),
    TEAM("/front/team","服务团队"),

    CONTACT("/front/contact","联系我们");

    private String code;
    private String name;

    public static FrontMenuEnum getByCategorize(String categorize){
        return Arrays.stream(FrontMenuEnum.values()).filter(m -> m.getCode().equals("/front/" + categorize)).findAny().orElse(null);
    }

    FrontMenuEnum(String code, String name) {
        this.code=code;
        this.name=name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
